package com.kingdee.eas.scm.sm.pur.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.eas.scm.sm.pur.PurOrderInfo;
import java.math.BigDecimal;
import java.util.Map;
import com.kingdee.eas.scm.common.SCMBillBaseCollection;
import java.util.Date;
import com.kingdee.eas.scm.common.app.SCMBillBaseControllerBean;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.eas.scm.sm.pur.PurOrderCollection;
import com.kingdee.eas.framework.CoreBaseCollection;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.eas.framework.CoreBillBaseCollection;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.jdbc.rowset.IRowSet;
import com.kingdee.eas.framework.ObjectBaseCollection;
import com.kingdee.bos.util.BOSUuid;



public abstract class AbstractPurOrderControllerBean extends SCMBillBaseControllerBean implements PurOrderController
{
    protected AbstractPurOrderControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("3171BFAD");
    }

    public void revoke(Context ctx, IObjectPK[] pks, IObjectValue[] reasonCodes) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("74b1d7d5-0105-1000-e000-019cc0a81226"), new Object[]{ctx, pks, reasonCodes});
            invokeServiceBefore(svcCtx);
            _revoke(ctx, pks, reasonCodes);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _revoke(Context ctx, IObjectPK[] pks, IObjectValue[] reasonCodes) throws BOSException, EASBizException;

    public void revoke(Context ctx, IObjectPK[] pks, String[] reasonCodes) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("44ad8ec3-010e-1000-e000-0018c0a812d9"), new Object[]{ctx, pks, reasonCodes});
            invokeServiceBefore(svcCtx);
            _revoke(ctx, pks, reasonCodes);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _revoke(Context ctx, IObjectPK[] pks, String[] reasonCodes) throws BOSException, EASBizException;

    public void revoke(Context ctx, IObjectPK pk, IObjectValue reasonCode) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("9942d4bc-0105-1000-e000-0064c0a81233"), new Object[]{ctx, pk, reasonCode});
            invokeServiceBefore(svcCtx);
            _revoke(ctx, pk, reasonCode);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _revoke(Context ctx, IObjectPK pk, IObjectValue reasonCode) throws BOSException, EASBizException;

    public void revoke(Context ctx, IObjectPK pk, String reasonCode) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("44ad8ec3-010e-1000-e000-001dc0a812d9"), new Object[]{ctx, pk, reasonCode});
            invokeServiceBefore(svcCtx);
            _revoke(ctx, pk, reasonCode);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _revoke(Context ctx, IObjectPK pk, String reasonCode) throws BOSException, EASBizException;

    public void audit(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("74b1d7d5-0105-1000-e000-019dc0a81226"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _audit(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _audit(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void audit(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("74b1d7d5-0105-1000-e000-019ec0a81226"), new Object[]{ctx, pks});
            invokeServiceBefore(svcCtx);
            _audit(ctx, pks);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _audit(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException;

    public PurOrderInfo getPurOrderInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-002dc0a81233"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            PurOrderInfo retValue = (PurOrderInfo)_getValue(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk);
    }

    public PurOrderInfo getPurOrderInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-002ec0a81233"), new Object[]{ctx, pk, selector});
            invokeServiceBefore(svcCtx);
            PurOrderInfo retValue = (PurOrderInfo)_getValue(ctx, pk, selector);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk, selector);
    }

    public PurOrderInfo getPurOrderInfo(Context ctx, String oql) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-002fc0a81233"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            PurOrderInfo retValue = (PurOrderInfo)_getValue(ctx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, String oql) throws BOSException, EASBizException
    {
        return super._getValue(ctx, oql);
    }

    public PurOrderCollection getPurOrderCollection(Context ctx) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-0030c0a81233"), new Object[]{ctx});
            invokeServiceBefore(svcCtx);
            PurOrderCollection retValue = (PurOrderCollection)_getCollection(ctx, svcCtx);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx) throws BOSException
    {
        return super._getCollection(ctx, svcCtx);
    }

    public PurOrderCollection getPurOrderCollection(Context ctx, EntityViewInfo view) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-0031c0a81233"), new Object[]{ctx, view});
            invokeServiceBefore(svcCtx);
            PurOrderCollection retValue = (PurOrderCollection)_getCollection(ctx, svcCtx, view);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, EntityViewInfo view) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, view);
    }

    public PurOrderCollection getPurOrderCollection(Context ctx, String oql) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7630bdc6-0105-1000-e000-0032c0a81233"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            PurOrderCollection retValue = (PurOrderCollection)_getCollection(ctx, svcCtx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, String oql) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, oql);
    }

    public void checkAlert(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("203d773c-0107-1000-e000-000cc0a8121b"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _checkAlert(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkAlert(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void alert(Context ctx, IObjectPK pk, IObjectValue model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("203d773c-0107-1000-e000-0011c0a8121b"), new Object[]{ctx, pk, model});
            invokeServiceBefore(svcCtx);
            _alert(ctx, pk, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _alert(Context ctx, IObjectPK pk, IObjectValue model) throws BOSException, EASBizException;

    public BigDecimal isNeedDeliveryAdvanceAlert(Context ctx, BOSUuid pk, BigDecimal advanceDay) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("8c8b0cb2-0107-1000-e000-0013c0a8121b"), new Object[]{ctx, pk, advanceDay});
            invokeServiceBefore(svcCtx);
            BigDecimal retValue = (BigDecimal)_isNeedDeliveryAdvanceAlert(ctx, pk, advanceDay);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract BigDecimal _isNeedDeliveryAdvanceAlert(Context ctx, BOSUuid pk, BigDecimal advanceDay) throws BOSException, EASBizException;

    public BigDecimal isNeedDeliveryDeferAlert(Context ctx, BOSUuid pk, BigDecimal deferDay) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("8c8b0cb2-0107-1000-e000-0019c0a8121b"), new Object[]{ctx, pk, deferDay});
            invokeServiceBefore(svcCtx);
            BigDecimal retValue = (BigDecimal)_isNeedDeliveryDeferAlert(ctx, pk, deferDay);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract BigDecimal _isNeedDeliveryDeferAlert(Context ctx, BOSUuid pk, BigDecimal deferDay) throws BOSException, EASBizException;

    public void canRevoke(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d49b85ef-0107-1000-e000-0045c0a8121b"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _canRevoke(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _canRevoke(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void canRevoke(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d49b85ef-0107-1000-e000-0047c0a8121b"), new Object[]{ctx, pks});
            invokeServiceBefore(svcCtx);
            _canRevoke(ctx, pks);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _canRevoke(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException;

    public void alter(Context ctx, IObjectPK pk, PurOrderInfo model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("20f3239c-0111-1000-e000-0023c0a812a7"), new Object[]{ctx, pk, model});
            invokeServiceBefore(svcCtx);
            _alter(ctx, pk, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _alter(Context ctx, IObjectPK pk, IObjectValue model) throws BOSException, EASBizException;

    public void agreeAlter(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("20f3239c-0111-1000-e000-0025c0a812a7"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _agreeAlter(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _agreeAlter(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void disaccordAlter(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("20f3239c-0111-1000-e000-002ac0a812a7"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _disaccordAlter(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _disaccordAlter(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void unAudit(Context ctx, IObjectPK[] pks) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("adf63d5d-0113-1000-e000-0022c0a812d1"), new Object[]{ctx, pks});
            invokeServiceBefore(svcCtx);
            _unAudit(ctx, pks);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }

    public void unAudit(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("adf63d5d-0113-1000-e000-0023c0a812d1"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _unAudit(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _unAudit(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public Map batchCheckForSumbit(Context ctx, IObjectPK[] entries) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("562a6ef6-1ecb-4ac7-9e82-20f1d6f5bfbe"), new Object[]{ctx, entries});
            invokeServiceBefore(svcCtx);
            Map retValue = (Map)_batchCheckForSumbit(ctx, entries);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Map _batchCheckForSumbit(Context ctx, IObjectPK[] entries) throws BOSException, EASBizException;

    public IRowSet getEntryForSupplierPrice(Context ctx, String materialID, String purchaseOrgUnitID, String unitID, Date bizDate) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ad3b1020-25cf-45d0-8982-1b8d892041c6"), new Object[]{ctx, materialID, purchaseOrgUnitID, unitID, bizDate});
            invokeServiceBefore(svcCtx);
            IRowSet retValue = (IRowSet)_getEntryForSupplierPrice(ctx, materialID, purchaseOrgUnitID, unitID, bizDate);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IRowSet _getEntryForSupplierPrice(Context ctx, String materialID, String purchaseOrgUnitID, String unitID, Date bizDate) throws BOSException;

    public IRowSet getEntryForApproved(Context ctx, String materialID, String purChaseOrgID) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b0502ae7-20e3-448f-be41-36cc2a5b2afa"), new Object[]{ctx, materialID, purChaseOrgID});
            invokeServiceBefore(svcCtx);
            IRowSet retValue = (IRowSet)_getEntryForApproved(ctx, materialID, purChaseOrgID);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IRowSet _getEntryForApproved(Context ctx, String materialID, String purChaseOrgID) throws BOSException;

    public boolean entryHasDest(Context ctx, Map param) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("51dd1137-95a0-4da5-8062-f39dde052017"), new Object[]{ctx, param});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_entryHasDest(ctx, param);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _entryHasDest(Context ctx, Map param) throws BOSException, EASBizException;

    public void sendOrd(Context ctx, PurOrderInfo model) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("0415f555-a553-49f3-8574-fa8f528bb53f"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            _sendOrd(ctx, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _sendOrd(Context ctx, IObjectValue model) throws BOSException;

    public void confirmation(Context ctx, PurOrderInfo model) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("3c8d8ce6-e125-4b64-8eb2-0479e8b45dbf"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            _confirmation(ctx, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _confirmation(Context ctx, IObjectValue model) throws BOSException;

    public void unConfirmation(Context ctx, PurOrderInfo model) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("5d3159a2-256b-4265-8839-cae3163be388"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            _unConfirmation(ctx, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _unConfirmation(Context ctx, IObjectValue model) throws BOSException;

    public SCMBillBaseCollection getSCMBillBaseCollection (Context ctx) throws BOSException
    {
    	return (SCMBillBaseCollection)(getPurOrderCollection(ctx).cast(SCMBillBaseCollection.class));
    }
    public SCMBillBaseCollection getSCMBillBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (SCMBillBaseCollection)(getPurOrderCollection(ctx, view).cast(SCMBillBaseCollection.class));
    }
    public SCMBillBaseCollection getSCMBillBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (SCMBillBaseCollection)(getPurOrderCollection(ctx, oql).cast(SCMBillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBillBaseCollection)(getPurOrderCollection(ctx).cast(CoreBillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBillBaseCollection)(getPurOrderCollection(ctx, view).cast(CoreBillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBillBaseCollection)(getPurOrderCollection(ctx, oql).cast(CoreBillBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx) throws BOSException
    {
    	return (ObjectBaseCollection)(getPurOrderCollection(ctx).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (ObjectBaseCollection)(getPurOrderCollection(ctx, view).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (ObjectBaseCollection)(getPurOrderCollection(ctx, oql).cast(ObjectBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBaseCollection)(getPurOrderCollection(ctx).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBaseCollection)(getPurOrderCollection(ctx, view).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBaseCollection)(getPurOrderCollection(ctx, oql).cast(CoreBaseCollection.class));
    }
}